package org.zmhhxl.user.domain.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.zmhhxl.api.auth.domain.entity.Role;
import org.zmhhxl.api.auth.domain.entity.UserInfo;
import org.zmhhxl.api.auth.domain.entity.UserRole;

import java.util.Set;

public interface UserRoleRepository extends JpaRepository<UserRole, Long> {
   public UserRole findByUserIdAndRoleId(Long userId, Long roleId);
   public void deleteByUserIdAndRoleId(Long userId, Long roleId);
   Set<Role> findByUserId(Long userId);
   Set<UserInfo> findByRoleId(Long roleId);
}
